home *** CD-ROM | disk | FTP | other *** search
- /*
- * Blob Manager Demonstration: Header file
- *
- * 19 July 1986 Paul DuBois
- */
-
- # ifndef __BLOBDEMO_H__
-
- # define __BLOBDEMO_H__
-
- /* control hiliting constants */
-
- # ifndef normalHilite
- # define normalHilite 0
- # endif
- # ifndef dimHilite
- # define dimHilite 255
- # endif
-
-
- /*
- * Resource numbers
- */
-
- # define helpTextRes 1000 /* help text */
- # define fshPictRes 1 /* fish picture */
- # define letrSicnNo 130 /* SICN containing hebrew letters */
- # define nameStrNo 130 /* STR# containing letter names */
-
-
- enum
- {
- aboutAlrtRes = 1000, /* "About BlobDemo..." alert */
- textDlogRes
- };
-
- enum /* window numbers. the ones between firstWindRes */
- { /* and lastWindRes should be consecutive */
-
- firstWindRes = 1000,
- fggWindRes = firstWindRes,
- farWindRes,
- hebWindRes,
- tttWindRes,
- tohWindRes,
- fshWindRes,
- aliceWindRes,
- radixWindRes,
- magicWindRes,
- statesWindRes,
- hangWindRes,
- pegWindRes,
- anaWindRes,
- swapWindRes,
- wolfWindRes,
- pyrWindRes,
- pongWindRes,
- lastWindRes /* not a real window - only a placeholder. */
- /* should come last in list */
- };
-
-
- enum /* menu numbers */
- {
- fileMenuRes = 256,
- windMenuRes,
- radixMenuRes,
- clickMenuRes,
- donorMenuRes,
- receptorMenuRes,
- editMenuRes,
- swapCnfgMenuRes,
- pegCnfgMenuRes
- };
-
- enum /* file menu item numbers */
- {
- closeWind = 1,
- closeAll,
- /* ---- */
- getInfo = 4,
- /* ---- */
- quit = 6
- };
-
- enum /* edit menu item numbers */
- {
- editUndo = 1,
- /* ---- */
- editCut = 3,
- editCopy = 4,
- editPaste = 5,
- editClear = 6
- };
-
- enum /* fox, goose, grain icon numbers */
- {
- foxIconRes = 1000,
- gooseIconRes,
- grainIconRes,
- farmerIconRes,
- whewIconRes,
- ratsIconRes
- };
-
- typedef BlobHandle CheckerBoard[8][8];
-
- void AnagramInit (void);
- void FarInit (void);
- void FggInit (void);
- void FshInit (void);
- void HangInit (void);
- void HebInit (void);
- void MagicInit (void);
- void PegInit (void);
- void PongInit (void);
- void PyrInit (void);
- void RadixInit (void);
- void StatesInit (void);
- void SwapInit (void);
- void TohInit (void);
- void TttInit (void);
- void WolfInit (void);
-
- pascal void DoMClobber (MenuHandle theMenu);
- void AddWindowTitles (void);
- void SetupMenus (void);
- void CloseAllWindows (void);
-
- void StrCpy (StringPtr dst, StringPtr src);
- void StrCat (StringPtr dst, StringPtr src);
- void MovesLeft (short n, StringPtr s);
- BlobHandle NewVButtonBlob (BlobSetHandle bSet, Rect *r, StringPtr title,
- Boolean visible);
- BlobHandle MakeCharBlob (BlobSetHandle bSet, Boolean enable, short glueMVal,
- Boolean mustMatch, short h, short v, char c);
- void SetCharBlobSize (short size);
- void MakeBlobGrid (short rows, short cols, short hOff, short vOff,
- short hWidth, short vHeight, short hGap, short vGap,
- void (*p) (Rect *r));
- void DrawGrid (short rows, short cols, short hOff, short vOff,
- short hWidth, short vHeight, short hGap, short vGap);
- GrafPtr NewOffPort (Rect *r);
- void DisposeOffPort (GrafPtr thePort);
- void MakeCheckerBoard (BlobSetHandle *boardBlobs, CheckerBoard *board,
- short pieceSize);
- BlobSetHandle MakeCheckersPieces (short pieceSize);
- void FindCheckerBoardPos (BlobHandle b, CheckerBoard *board, short *h, short *v);
- Boolean CheckerBoardPosEmpty (CheckerBoard *board, short h, short v);
- # define CheckerBoardPosFilled(board,h,v) (!CheckerBoardPosEmpty(board,h,v))
-
- WindowPtr GetDemoWind (short resNum);
- pascal void DoWClobber (void);
- void SetDragRects (GrafPtr thePort);
- void MakeFrontWind (WindowPtr w);
-
- void TextDialog (short dlogNum, Handle textHandle,
- short fontNum, short fontSize, Boolean wrap);
-
- unsigned char *PickWord (void);
-
- # endif /* __BLOBDEMO_H__ */
-